diff options
| author | Sebastien Castiel <sebastien@castiel.me> | 2023-12-19 09:44:09 -0500 |
|---|---|---|
| committer | Sebastien Castiel <sebastien@castiel.me> | 2023-12-19 09:44:09 -0500 |
| commit | f881aff5f9993c3a6b4b0d8ed7e67d2f812f39d6 (patch) | |
| tree | 685731e70ad838dbc2b3d70450e090e1e5fc31c9 /src/app/groups/[groupId]/@modal/expenses/[expenseId] | |
| parent | 1e66efe5169dfad9a0c62ba42fbf31ce977bf49e (diff) | |
Revert "Use modal dialogs for expense creation & edition (#10)"
This reverts commit 1e66efe5169dfad9a0c62ba42fbf31ce977bf49e.
Diffstat (limited to 'src/app/groups/[groupId]/@modal/expenses/[expenseId]')
| -rw-r--r-- | src/app/groups/[groupId]/@modal/expenses/[expenseId]/edit/page.tsx | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/src/app/groups/[groupId]/@modal/expenses/[expenseId]/edit/page.tsx b/src/app/groups/[groupId]/@modal/expenses/[expenseId]/edit/page.tsx deleted file mode 100644 index fb70f45..0000000 --- a/src/app/groups/[groupId]/@modal/expenses/[expenseId]/edit/page.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import { ExpenseModal } from '@/app/groups/[groupId]/@modal/expense-modal' -import { ExpenseForm } from '@/components/expense-form' -import { getExpense, getGroup } from '@/lib/api' -import { Metadata } from 'next' -import { notFound } from 'next/navigation' - -export const metadata: Metadata = { - title: 'Edit expense', -} - -export default async function EditExpensePage({ - params: { groupId, expenseId }, -}: { - params: { groupId: string; expenseId: string } -}) { - const group = await getGroup(groupId) - if (!group) notFound() - const expense = await getExpense(groupId, expenseId) - if (!expense) notFound() - - return ( - <ExpenseModal title="Edit expense"> - <ExpenseForm group={group} expense={expense} /> - </ExpenseModal> - ) -} |
